﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;

namespace MF.ServiceModel
{
    public sealed class IoC
    {
        IoC() 
        {
            this.Container = new UnityContainer();
        }

        public static IoC Current
        {
            get
            {
                return Nested.Instance;
            }
        }

        public IUnityContainer Container { get; private set; }

        class Nested
        {
            static Nested() { } //para nao ser beforefieldinit

            internal static readonly IoC Instance = new IoC();
        }
    }
}
